<?php

/**
 * Narudzbina form.
 *
 * @package    marketing
 * @subpackage form
 * @author     Your name here
 */
class NarudzbinaForm extends BaseNarudzbinaForm
{
  public function configure()
  {
     $this->setWidgets(array(
      'nacin_placanja_id'       => new sfWidgetFormPropelChoice(array('model' => 'NacinPlacanja', 'add_empty' => false)),
      'nacin_isporuke_id'       => new sfWidgetFormPropelChoice(array('model' => 'NacinIsporuke', 'add_empty' => false))
       ));


    $this->setValidators(array(
      'proizvod_id'   => new sfValidatorPropelChoice(array('model' => 'Proizvod', 'column' => 'id', 'required' => false)),
      'narudzbina_id' => new sfValidatorPropelChoice(array('model' => 'Narudzbina', 'column' => 'id', 'required' => false)),
      'kolicina'      => new sfValidatorInteger(),
      'created_at'    => new sfValidatorDateTime(array('required' => false)),
      'updated_at'    => new sfValidatorDateTime(array('required' => false)),
      'deleted_at'    => new sfValidatorDateTime(array('required' => false)),
    ));
       $this->getWidgetSchema()->setNameFormat("narudzbina[%s]");

  }
}
